1. Field of the Invention
This invention relates to computer systems and, more particularly, to paging policies used in memory systems.
2. Description of the Related Art
DRAM (Dynamic Random Access Memory) devices are often divided up into banks. A bank of memory typically includes an array of rows and columns of memory elements. The memory elements included in a particular bank and row are called a page. In order to access data within a page of memory, the page is activated, or opened, which loads the contents of the page from the memory array into a buffer (e.g., a sense amplifier) on the memory chip being accessed, allowing a read or write access to data within that page to take place.
Once a page is open, a subsequent request to access data within that page can be performed without needing to reopen the page. This scenario is called a page hit. A page hit has low latency because there is no need to open the page before the requested access can take place. A scenario in which a subsequent request to a different, inactive page within a bank that already has an active page is received is called a page conflict. Page conflicts have a higher latency because they require that the currently open page be closed (e.g., by precharging the bank) and the requested page must then be opened before the requested access can take place. Additionally, if a prior request that activated the currently open page has not yet completed, the conflicting request will be stalled because the bank cannot be closed until the prior request completes.
Various paging policies have been developed to control when open pages are closed. These paging policies have been designed in order to either benefit from page hits or to decrease the likelihood of page conflicts. One paging policy is a closed paging policy. In a closed paging policy, pages are closed as soon as each access completes. While a closed paging policy reduces the risk of page conflicts occurring, it also reduces the likelihood of page hits.
Another paging policy is called an open paging policy. In an open paging policy, a page is left open after the current request completes. The page is closed when a page conflict is detected. An open paging policy is effective and efficient if the majority of the requests to the memory are expected to produce page hits, since these requests can then be satisfied by simply performing the read or write operation to the already-opened page. This policy may be substantially less effective and efficient, however, if the majority of the memory requests cause page conflicts. As mentioned above, page conflicts have longer latency, especially if the prior request has not completed yet. As a result, an open paging policy creates a risk of a significant performance loss.
A less-risky version of an open paging policy involves leaving a page open for a certain number of clock cycles before closing the page. This modified open paging policy is typically implemented by initializing a counter to a pre-selected threshold value when a page is opened and decrementing the counter each subsequent clock cycle that the page remains open. If the page is not accessed before the counter expires, the page is closed. This paging policy may improve performance, but it may still offer less than optimal performance in response to different memory access patterns. For example, if a series of page hits would have occurred if the threshold value had been higher, this paging policy is less efficient than an open paging policy. Similarly, if a series of page conflicts would not have occurred if the threshold value had been lower, this paging policy is less efficient than a closed paging policy. Furthermore, if both types of access patterns are expected to occur, it may be difficult to select an ideal threshold value. Accordingly, it is desirable to be able to implement an improved paging policy.